$(function(){	
	 
	layui.use('upload', function(){
		   layui.upload({
		    url: rootPath + '/equip/excel.shtml',
		    title: '导入',
		    ext: 'xls|xlsx',
		    success: function(res){
		    	alert(res);
		    if(res=="success"){
		    	layer.msg('导入数据成功');
		    }else{
		    	layer.msg('导入数据失败');
		    }
		    }
		});
		});   
	
	
	$("#export").click("click", function() {
		exportAccount();	
	});
	
	
})

function exportAccount() {
	layer.confirm('是否导出数据？', function(index) {
		var url = rootPath + '/equip/category_exportEntity.shtml';
		var s = CommnUtil.ajax(url,"json");
		alert(s);
		if (s=="success") {
			layer.msg('导出数据成功');
		}else {
			layer.msg('导出数据失败');
		}
	});
}


